Skip to content

core: version_gate v36 SSOT (BTC-first) - #148

Merged
frstrtr merged 2 commits into
masterfrom
btc/v36-core-version-gate-ssot
Jun 18, 2026
Merged

core: version_gate v36 SSOT (BTC-first)#148
frstrtr merged 2 commits into
masterfrom
btc/v36-core-version-gate-ssot

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Introduces core::version_gate — the single source of truth for the V36 share-format / consensus-revision activation boundary (uniform 36 across btc/ltc/bch/dgb; every coin's params set current_share_version=36).

What

  • New src/core/version_gate.hpp: V36_ACTIVATION_VERSION = 36 + constexpr is_v36_active(version).
  • BTC share.hpp: 7 scattered version >= 36 literals → core::version_gate::is_v36_active(version). Byte-identical gate, no value change.

Scope

  • Owns: the v36 share-format gate only.
  • Out of scope: segwit activation — coin-specific (BTC 33, dgb 35, ltc/bch 17), stays in per-coin PoolConfig::SEGWIT_ACTIVATION_VERSION.

Conformance (BTC-first)

BTC is the reference adoption. ltc/dgb/bch conform later by mechanical site-rewrite (no value change). Remaining BTC >= 36 sites in share_check.hpp / share_tracker.hpp are follow-up mechanical rewires; this PR establishes the SSOT + canonical adoption in the share serializer.

Verify

c2pool-btc builds green (self-verify, local cmake). constexpr predicate serves both if constexpr and runtime call sites.

Merge operator-gated.

frstrtr added 2 commits June 18, 2026 05:55
Introduce core::version_gate as the single source of truth for the V36
share-format / consensus-revision activation boundary (uniform 36 across
all coins). Replace the seven scattered "version >= 36" literals in the
BTC share serializer with core::version_gate::is_v36_active(version).

Scope: owns the v36 share-format gate only. Segwit activation stays per
coin PoolConfig (BTC 33, dgb 35, ltc/bch 17) — explicitly out of scope.
BTC is the reference adoption; ltc/dgb/bch conform by mechanical
site-rewrite (no value change, byte-identical gate).

constexpr predicate serves both if-constexpr template gates and runtime
checks. c2pool-btc builds green (self-verify).
Mechanical follow-up to b4d1912: replace the remaining bare >= 36
share-version gates with core::version_gate::is_v36_active(). 26 sites
in share_check.hpp (both if constexpr and runtime) + 1 in
share_tracker.hpp; byte-identical gate, no value change. Comments
referencing p2pool provenance left intact. Explicit
#include <core/version_gate.hpp> added to both headers.
@frstrtr
frstrtr merged commit 612f565 into master Jun 18, 2026
17 checks passed
frstrtr added a commit that referenced this pull request Jun 18, 2026
dgb: delegate V36 version-gate sites to core::version_gate SSOT (#148)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant